ng-template(#t, let-fill="fill")
  svg.slds-icon([nglIconName]="icon", [ngClass]="size ? 'slds-icon_' + size : ''", [style.fill]="fill === 100 ? colorOn : colorOff")
  svg.slds-icon(*ngIf="fill > 0 && fill < 100", [nglIconName]="icon", [ngClass]="size ? 'slds-icon_' + size : ''",
    [style.fill]="colorOn", style="position:absolute; bottom:0;", [style.left.%]="fill - 100", [xPos]="(100 - fill) + '%'")

.slds-show_inline-block(*ngFor="let r of range; let i = index", (click)="update(r)", (mouseenter)="enter(r)", style="position: relative;")
  ng-template([ngTemplateOutlet]="_template", [ngTemplateOutletContext]="{$implicit: r <= currentRate, index: i, fill: getFill(r)}")
